import json

# JSON写入
numbers = [2, 3, 5, 7, 11, 13]
filename = 'numbers.json'

with open(filename, 'w') as f_obj:
    json.dump(numbers, f_obj)

# JSON读取
filename = 'numbers2.json'
with open(filename, encoding='UTF-8') as f_obj:
    numbers = json.load(f_obj)
    print(numbers)
